<?php
namespace app\agent\service;

use app\agent\logic\AddrLogic;
use app\agent\servlet\AddrServlet;

class AddrService extends BaseService
{
	private $addr = null;
	
	private $servlet = null;
	
	public function __construct()
	{
		parent::__construct();
		
		$this->addr = new AddrLogic();
		
		
		$this->servlet = new AddrServlet();
		
	}

	/**
	* @action 地区详情
	*/
	public function getViewDetail($data = [])
	{
		$where = [
				$this->addr->getPk() => $data['id'],
		];

		$data = $this->addr->getDetail($where);

		if ( $data === false )
		{
			$this->error = $this->addr->getError();

			return false;
		}
		
		return $data;
	}
}